#include <stdio.h>
#define MAXSIZE 100
typedef int ElemType;

typedef struct 
{
    ElemType data[MAXSIZE];
    int front, rear;
}Queue;

void InitQueue(Queue* q)
{
    q->front = 0;
    q->rear = 0;
}

int isEmpty(Queue* q)
{
    if(q->front == q->rear)
    {
        printf("Queue is empty\n");
        return 1;
    }
    else
    {
        return 0;
    }
}

int equeue(Queue *Q, ElemType e)
{
    if (Q->rear + 1 % MAXSIZE == Q->front)
    {
        printf("Queue is full\n");
        return 0;
    }
    Q->data[Q->rear] = e;
    Q->rear = (Q->rear + 1) % MAXSIZE;
    return 1;
}

int getHead(Queue* Q, ElemType* e)
{
    if (isEmpty(Q))
    {
        return 0;
    }
    *e = Q->data[Q->front];
    return 1;
}

int main()
{
    return 0;
}